package com.lagou.transfer.listener;

import com.lagou.transfer.configuration.WebConfiguration;
import com.spring.application.AnnotationApplicationContext;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import java.util.logging.Logger;

public class WebListener implements ServletContextListener {
    private Logger logger = Logger.getLogger("");

    @Override
    public void contextInitialized(ServletContextEvent servletContextEvent) {
        AnnotationApplicationContext annotationApplicationContext = new AnnotationApplicationContext(WebConfiguration.class);
        logger.info("Servlet容器初始化成功");
    }

    @Override
    public void contextDestroyed(ServletContextEvent servletContextEvent) {

    }
}
